/* 
 * File:   MetaInfoZooming.cpp
 * Author: Guilherme Monteiro
 * 
 */

#include "../headers/MetaInfoZooming.h"

/**
 * Constructor of class MetaInfoZooming.
 * 
 * It receives the path to the high resolution
 * binarized table.
 * 
 * The path waited must have the follow format (example):
 * "/books/caracterizacao/metadados/tabelasAlta/image278_0.png"
 * 
 * @param highTablePath: path to high resolution table
 */
MetaInfoZooming::MetaInfoZooming(string highTablePath) throw (NullImageException) : TessMetaInfo(highTablePath) {  
    setOutputSelectionsFileName();
}

MetaInfoZooming::MetaInfoZooming(const MetaInfoZooming& orig) : TessMetaInfo(orig) {
}

MetaInfoZooming::~MetaInfoZooming() {
}

/**
 * Returns the output path of the selections.
 * 
 * @return outputSelectionsFileName
 */
string MetaInfoZooming::getOutputSelectionsFileName() {
    return this->outputSelectionsFileName;
}

/**
 * Sets the output selections file name.
 * 
 * @param path: output selections file name
 */
void MetaInfoZooming::setOutputSelectionsFileName() {
    this->outputSelectionsFileName = ".." + BOOKS + getBookName() + SELECTIONS +
            getPageName().replace(getPageName().size()-4, getPageName().size(), ".txt");
}